<template>
  <el-table
      v-loading="loading"
      :data="tableData"
      style="width: 100%"
      :cell-style="{height:'.1vh',padding:'1px'}"
      :row-style="{height:'.1vh'}"
      :header-cell-style="{height:'.1vh',padding:'1px'}"
      :border="true"
  >
    <el-table-column
        label="收测时间"
        prop="time"
        width="160"
        align="center"
    >
    </el-table-column>

    <el-table-column
        label="收测人"
        prop="monitor"
        align="center"
    >
    </el-table-column>
  </el-table>
</template>

<script>
// ------------------ axios ------------------
import {getRedioTest} from "../../../../../api/work";

export default {
  data() {
    return {
      tableData: [],
      loading: false
    }
  },
  created() {
    this.getRedioTest();
  },
  watch: {
    mobile: function () {
      this.getRedioTest();
    }
  },
  methods: {
    getRedioTest: function () {
      const pd = {
        page: 1,
        limit: 10,
        mobile: this.mobile,
      }
      this.loading = true;
      getRedioTest(pd)
          .then(res => {
            this.loading = false;
            this.tableData = res.data.data
          })
          .catch(err => {
            this.loading = false;
            console.error(err)
          });
    }
  },
  props: {
    mobile: {
      type: String,
      default: ""
    }
  }
}
</script>

<style scoped>

</style>